<div id="admin_orders">
  <p>
    <a href="<%= new_admin_order_path %>" class="btn btn-success btn-sm">
      <su-icon icon="plus" color="#fff" fix-width></su-icon>
      新增
    </a>
  </p>
  <%= grid(@orders, show_filters: :when_filtered) do |g|
    #g.action_column param_name: :select_ids, object_property: :id
    g.column name: "编号", attribute: 'id', ordering: true
    g.column name: "#{t 'activerecord.attributes.order.sr'}", attribute: 'sr'
    g.column name: "#{t 'activerecord.attributes.order.phone'}",  attribute: 'phone'
    g.column name: "#{t 'activerecord.attributes.order.name'}", attribute: 'name'


    g.column do |c|
      grid_operator(:admin_order_path, c.id)
    end
  end %>
</div>
<script type="text/javascript" data-turbolinks-eval="true">
  new Vue({
    el: "#admin_orders",
    beforeCompile: function () {
    }
  })
</script>